@extends('dashboard.base')

@section('content')
	<div class="card-header"><a href="{{route('admin.swipers.create')}}" class="btn btn-square  btn-info active">添加图片</a></div>

	<table class="table table-responsive-sm">
		<thead>
			<th>图片</th>
			<th>链接地址</th>
			<th>排序</th>
			
			<th>操作</th>
		</thead>
		<tbody>
			@foreach($datas as $v)
				<tr>
					<td><img src="{{ Storage::url($v->picture) }}" width="50" height="50"></td>
					<td>{{ $v->link }}</td>
					<td>{{ $v->sort }}</td>
					<td>
						<a href="{{route('admin.swipers.edit', $v)}}" class="badge badge-info text-white">编辑</a>
                        <a href="javascript:;" class="badge badge-danger text-white" data-url="{{route('admin.swipers.destroy', $v)}}"> 删除 </a>
					</td>
				</tr>
			@endforeach
		</tbody>
	</table>
@endsection